package com.tos.controller;
import com.tos.pojo.Notification;
import com.tos.pojo.Passenger;
import com.tos.service.NotificationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;

@RestController
@RequestMapping("/note")
public class NotificationController {
    @Autowired
    private NotificationService notificationService;


    @RequestMapping("/getNotes")
    public List<Notification> getNotes(@RequestBody Passenger passenger) {
        return notificationService.getNotes(passenger.getPhone());
    }


}
